# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=grpcurl
pkgver=1.8.9
pkgrel=0
pkgdesc="CLI tool to interact with gRPC servers"
url="https://github.com/fullstorydev/grpcurl"
arch="all"
license="MIT"
makedepends="go"
options="net"
source="$pkgname-$pkgver.tar.gz::https://github.com/fullstorydev/grpcurl/archive/refs/tags/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v -ldflags "-X main.version=v$pkgver" ./cmd/grpcurl/
}

check() {
	go test ./...
}

package() {
	install -Dm755 $pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
5ef0e918a10ce8fcefebe4d77c6efd73830c9159c423e6fe54da54e4c2942665861bf7b5235b72317aa157328bf0b3681984873a70c39264f8060f9ab927fb99  grpcurl-1.8.9.tar.gz
"
